package org.sixplusone.redblue;

import static org.sixplusone.redblue.Utils.initArray;
import static org.sixplusone.redblue.Utils.select;

import java.util.Random;

public class SimpleRandomGenerator implements Generator {

	/*
	 * (non-Javadoc)
	 * 
	 * @see redblue.Generator#generate()
	 */
	public Result generate(Random random) {
		int[] selectedRed = internalSelect(initArray(33), 6, random);
		int[] selectedBlue = internalSelect(initArray(16), 1, random);
		return new Result(selectedRed, selectedBlue[0]);
	}

	public SimpleRandomGenerator() {

	}

	private int[] internalSelect(int[] array, int n, Random random) {
		return select(array, n, random);
	}

}
